package com.x.attendance.assemble.control.jaxrs.fingerprint;

import com.x.base.core.project.http.ActionResult;
import com.x.base.core.project.http.EffectivePerson;
import com.x.base.core.project.logger.Logger;
import com.x.base.core.project.logger.LoggerFactory;

public class ActionGetCollectorStatus extends BaseAction {

    private static Logger logger = LoggerFactory.getLogger(ActionGetCollectorStatus.class);

    public ActionResult<Wo> execute(EffectivePerson effectivePerson) throws Exception {
        ActionResult<Wo> result = new ActionResult<>();
        
        try {
            // TODO: 实现获取采集器状态逻辑
            Wo wo = new Wo();
            wo.setConnected(false);
            wo.setMessage("采集器未连接");
            result.setData(wo);
        } catch (Exception e) {
            logger.error(e);
            throw e;
        }
        
        return result;
    }

    public static class Wo {
        private Boolean connected;
        private String message;

        public Boolean getConnected() {
            return connected;
        }

        public void setConnected(Boolean connected) {
            this.connected = connected;
        }

        public String getMessage() {
            return message;
        }

        public void setMessage(String message) {
            this.message = message;
        }
    }
}

